<template>
    <div class="bg_wrap">
        <div class="login_model">
            <div class="login_container">
                <div class="form_title">
                    <span class="login_title_text">登陆</span>
                </div>
                <div class="form_item">
                    <div class="form_label">
                        <span>手机号码</span>
                    </div>
                    <div class="form_select_phone">
                        <span>+86</span>
                    </div>
                    <input
                        class="form_input line"
                        v-model="username"
                        placeholder="注册时填写的手机号"
                    />
                </div>
                <div class="form_item">
                    <div class="form_label">
                        <span>登陆密码</span>
                    </div>
                    <input
                        class="form_input"
                        v-model="password"
                        placeholder="输入密码"
                    />
                    <div class="form_getcode">获取验证码</div>
                </div>
                <div class="login_schema">
                    <div class="fl">验证码登陆</div>
                    <!-- <div>密码登陆</div> -->
                    <div class="fr">忘记密码?</div>
                </div>
                <div class="form_btn" @click="handleLogin">
                    <!-- <a-button type="primary" @click="handleLogin"> -->
                    登陆
                    <!-- </a-button> -->
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import { mapMutations } from "vuex";
export default {
    data() {
        return {
            username: "",
            password: "",
        };
    },
    computed: {
        datas() {
            return this.$store.state.num;
        },
    },
    methods: {
        adds() {
            this.add();
        },
        handleLogin() {
            this.$router.push("/manage");
        },
        ...mapMutations(["add"]),
    },
};
</script>
<style lang="scss" scoped>
.bg_wrap {
    height: 100%;
    background: url("../../assets/images/login_bg.png") top left no-repeat;
    background-size: cover;
    overflow: hidden;
    .login_model {
        z-index: 1;
        position: absolute;
        top: 50%;
        left: 50%;
        margin-left: -190px;
        margin-top: -255px;
        box-sizing: border-box;
        width: 380px;
        height: 510px;
        padding: 30px 30px 40px;
        background: #fff;
        box-shadow: 0 20px 30px 0 rgba(63, 63, 65, 0.06);
        border-radius: 10px;
        .login_container {
            width: 100%;
            height: 100%;
            position: relative;
            .form_title {
                margin-bottom: 40px;
                .login_title_text {
                    font-size: 20px;
                    color: #2589ff;
                }
                .go_register {
                    float: right;
                    vertical-align: middle;
                }
            }
            .form_item {
                display: flex;
                height: 40px;
                line-height: 40px;
                margin-bottom: 30px;
                color: #595961;
                border-bottom: 1px solid #e3e3e3;
                .form_label {
                    width: 70px;
                    font-size: 14px;
                    margin-right: 10px;
                }
                .form_select_phone {
                    margin-right: 5px;
                }
                .form_input {
                    flex: 1;
                    border: none;
                }
                .line {
                    border-left: 1px solid #ddd;
                    margin: 8px 0 8px 10px;
                    padding: 5px 5px 5px 10px;
                }
                .form_getcode {
                    width: 70px;
                    color: #2589ff;
                    cursor: pointer;
                }
                input::placeholder {
                    color: #ddd !important;
                }
            }
            .login_schema {
                color: #9797a1;
                font-size: 14px;
                .fl {
                    float: left;
                }
                .fr {
                    float: right;
                }
            }
            .form_btn {
                position: absolute;
                width: 320px;
                height: 50px;
                line-height: 50px;
                text-align: center;
                color: #fff;
                background: #2589ff;
                border-radius: 6px;
                font-size: 16px;
                margin: 0 auto;
                bottom: 0;
                cursor: pointer;
            }
        }
    }
}
</style>